package order

type iOrderRepository interface {
	NewOrderID() int64
	NewItemID() int64

	LoadOrderHeader(orderID int64) (error, *tOrderHeaderEntity)
	SaveOrderHeader(it *tOrderHeaderEntity) (error, *tOrderHeaderEntity)

	LoadOrderItemsByOrderID(orderID int64) (error, []*tOrderItemEntity)
	LoadOrderItem(itemID int64) (error, *tOrderItemEntity)
	SaveOrderItem(it *tOrderItemEntity) (error, *tOrderItemEntity)
	RemoveOrderItem(it *tOrderItemEntity) error

	Transaction(func() error) error
}
